//
//  BOCImageDownloadTask.h
//  BOCImageTools
//
//  Created by LeungChaos on 16/5/11.
//  Copyright © 2016年 liang. All rights reserved.
//

#import "BOCHeader.h"

@interface BOCImageDownloadTask : NSObject
{
    BOOL *_cancel;
}
// 完成状态
@property (nonatomic, readonly, getter=isCompleted)  BOOL completed;
// 下载任务的唯一标示
@property (nonatomic, readonly) NSString *identifier;
// 取消状态
//@property (nonatomic, assign) BOOL * cancel;

- (void)setCancel:(BOOL)cancel;

@property (nonatomic, readonly, strong) NSURLSessionDownloadTask *downloadTask;

- (instancetype)initWithUrl:(NSURL *)url progress:(BOCProgressHandlerProgressBlock)progressBlock session:(NSURLSession *)session seccess:(BOCDownloadImageSeccessBlock)seccessBlock fail:(BOCDownloadImageFailErrorBlock)errorBlock;



@end
